package 抽象类GeometricFigure及其子类;

public class Rectangle extends GeometricFigure {
    private double height,width;
    public Rectangle(double height,double width){
        this.height=height;
        this.width=width;
    }

    @Override
    public double getArea() {
        return height * width;
    }

    @Override
    public double getPerimeter() {
        return 2 * (height + width);
    }
}